<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var obj = {
      a: 10,
      b: 20
    }
    // 什么时候重新开辟空间  重新 赋值一个新的对象
    var obj2 = {
      ...obj
    }
    obj2.a = 100;
    console.log(obj2);
    console.log(obj);
    // Object.assign(obj, 其他对象)
    var obj3 = Object.assign({}, obj)
    // 深克隆  递归  lodash  函数的防抖和节流
  </script>
</body>
</html>